<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> 
<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>eosms for IFS</title>
  <meta name="description" content="房企销管系统">
  <meta name="keywords" content="房企 开发商 销管 IFS">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="assets/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="eosms for IFS" />
  <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="assets/css/admin.css">
  <link rel="stylesheet" media="screen" href="assets/css/handsontable.full.min.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->

<jsp:include page="/header.do" flush="true"/>

<div class="am-cf admin-main">
  <!-- sidebar start -->
  <jsp:include page="/tree.do" flush="true"/>
  <!-- sidebar end -->

<!-- content start -->
<div class="admin-content">
	<div class="admin-content-body">
	  <div class="am-cf am-padding">
	    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">报价单</strong> / <small>quotation</small></div>
	  </div>
	  <div class="am-g">
	  	<div class="am-u-sm-12 am-u-md-6">
          <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs">
              <button type="button" class="am-btn am-btn-default" onclick="add()"><span class="am-icon-plus"></span> 新增</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 保存</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-archive"></span> 审核</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>
            </div>
          </div>
        </div>
        <div class="am-u-sm-12 am-u-md-3">
          <div class="am-form-group">
            <select data-am-selected="{btnSize: 'sm'}">
              <option value="option1">所有类别</option>
              <option value="option2">IT业界</option>
              <option value="option3">数码产品</option>
              <option value="option3">笔记本电脑</option>
              <option value="option3">平板电脑</option>
              <option value="option3">只能手机</option>
              <option value="option3">超极本</option>
            </select>
          </div>
        </div>
        <div class="am-u-sm-12 am-u-md-3">
          <div class="am-input-group am-input-group-sm">
            <input type="text" class="am-form-field">
          <span class="am-input-group-btn">
            <button class="am-btn am-btn-default" type="button">搜索</button>
          </span>
          </div>
        </div>
	    <div class="am-u-sm-12">
	    	<div id="example"></div>
	    </div>
      </div>
	</div>
	<jsp:include page="/foot.do" flush="true"/>
</div>
<!-- content end -->

</div>

<a href="#" class="am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}">
  <span class="am-icon-btn am-icon-th-list"></span>
</a>



<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/app.js"></script>
<script src="assets/js/handsontable.full.js"></script>
<script type="text/javascript">
var
data = [
  {
    title: "<a href='http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691'>Professional JavaScript for Web Developers</a>",
    description: "This <a href='http://bit.ly/sM1bDf'>book</a> provides a developer-level introduction along with more advanced and useful features of <b>JavaScript</b>.",
    comments: "I would rate it &#x2605;&#x2605;&#x2605;&#x2605;&#x2606;",
    cover: "http://ecx.images-amazon.com/images/I/51bRhyVTVGL._SL50_.jpg"
  },
  {
    title: "<a href='http://shop.oreilly.com/product/9780596517748.do'>JavaScript: The Good Parts</a>",
    description: "This book provides a developer-level introduction along with <b>more advanced</b> and useful features of JavaScript.",
    comments: "This is the book about JavaScript",
    cover: "http://ecx.images-amazon.com/images/I/51gdVAEfPUL._SL50_.jpg"
  },
  {
    title: "<a href='http://shop.oreilly.com/product/9780596805531.do'>JavaScript: The Definitive Guide</a>",
    description: "<em>JavaScript: The Definitive Guide</em> provides a thorough description of the core <b>JavaScript</b> language and both the legacy and standard DOMs implemented in web browsers.",
    comments: "I've never actually read it, but the <a href='http://shop.oreilly.com/product/9780596805531.do'>comments</a> are highly <strong>positive</strong>.",
    cover: "http://ecx.images-amazon.com/images/I/51VFNL4T7kL._SL50_.jpg"
  }
]

 var container = document.getElementById('example');
 var hot = new Handsontable(container, {
   data: data,
   height: 500,
   rowHeaders: true,
   language:"en-US",
   colWidths: [200, 200, 200, 80],
   colHeaders: ["Title", "Description", "Comments", "Cover"],
   stretchH: 'all',
   contextMenu: true,
   manualRowMove: true,
   manualColumnMove:false
 });
 
 
 hot.updateSettings({
	    contextMenu: {
	      callback: function (key, options) {
	        if (key === 'about') {
	          setTimeout(function () {
	            // timeout is used to make sure the menu collapsed before alert is shown
	            alert("This is a context menu with default and custom options mixed");
	          }, 100);
	        }
	      },
	      items: {
	        "row_above": {
	          disabled: function () {
	            // if first row, disable this option
	            return hot.getSelected()[0] === 0;
	          }
	        },
	        "row_below": {},
	        "col_left": {},
	        "col_right": {},
	        "hsep1": "---------",
	        "remove_col": {
	          name: 'Remove this row, ok?',
	          disabled: function () {
	            // if first row, disable this option
	            return hot.getSelected()[1] === hot.countCols()-3
	          }
	        },
	        "hsep2": "---------",
	        "about": {name: 'About this menu'}
	      }
	    }
	  })
 
 hot.addHook('afterCreateRow', function(index,amount,source){
	 hot.setDataAtCell(index, 0, 'new value');
	 //alert(source);
 });
 
 hot.addHook('beforeRemoveCol', function(index,amount){
	 
 });
 
 function add(){
	 hot.alter("insert_col",2);
 }
 
</script>
</body>
</html>